NSF ripper Guide Level 0


Level 0   Level 1   Level 2   Level 3   Level 4  

Level 5   Level 6   Level 7   Level 8   Level 9

Level 10   Level 11   Level 12   Level 13   Level 14


NSF Reference Data

Family Computer   NSF Spec   Mapper Registers   6502 Guide   Opcodes
APU Reference   NES Audio Ripping


LEVEL0 Preparation

Start gathering the tools!!

The first thing you want to do is get a NSF player and a couple of NSF's. Go to Zophar's Domain to get all the NSF's and NSF
players you want. You can also get NSF's here on my page Gil_Galad.

As far as the players are concerned you could chose several. NotsoFatso is supposedly one of the best Winamp plugins.
I have no idea since it's way too slow to run on my pc. If you have a slow pc you might want to get Nosefart.
Nosefart is not an accurate player at all, the player was designed to run on low end systems like mine and it sacrifices
a lot of accuracy to do so. You also have stand alone NSF players like GNSF. GNSF is a good player and has some tools that
you can use. You have a menu with a sound channel meter and you turn the channels off and on if you wish. You can also tell
what channel is missing in your rip. SlickNSF is also a good stand alone player because you can dump a trace log which helps
so much in debugging the NSF's code.

You also have emulators that support NSF playing. FCEUD,Nesten,VirtuaNES,Nintendulator has built in NSF players. Most of them
has some type of 6502 debugging tool. FCEUD is about the best NES debugger you can get. Nesten also has a debugger and can
dump ram which is useful in trapping the right banks with music code/data. Nintendulator has a trace logger and can dump
the trace. Also if you have problems with your NSF then Nintendulator will not play the NSF. What will happen is that you
will get an error message saying the you have a NSF that's corrupted or has raw PCM. In most cases you have a routine
in the code that is timing out and doesn't return in so many frames. This is useful because after you fix the problem the
NSF will run on just about any player.

Make sure that when you chose a player that has support for the expansion sound chips. Here is the expansion sound
chip format and the only ones you will find left to rip are FDS disks and some FDS games dont have FDS expansion sound so be
aware of that. Very few players support all sound chips so look around.


Pre-preparation Analysis
Prepare Header
The 128 byte header is used to prepend to the data that you have ripped.
Remove the NES header
The 16 byte header is what emulators use to run the ROM. However this header is not needed nor used in the actual
cartridge. If the header is not removed then the banks will be off by 16 bytes.

When NES2NSFis used. It's as simple as it gets. Also with this tool you don't need to remove the 16 byte NES header. A 128
byte NSF header is added to every 16K bank ripped from the ROM.
You cannot use UNIF format NES roms with this tool.
The NSF Header
You must use this header for NSF compiliation.
Provided is the NESM header format and in detail.
offset # of bytes   Function
----------------------------

0000  5   STRING  "NESM",01Ah  ; NSF standard indication.
0005  1   BYTE    Current NSF version number. Presently 1
0006  1   BYTE    Number of tracks
0007  1   BYTE    Starting track
0008  2   WORD   load(lo/hi) Load address of data            memory range: (8000-FFFF)
000A  2   WORD   init(lo/hi) Start of initialization data    memory range: (8000-FFFF)
000C  2   WORD   play(lo/hi) Start of driver data            memory range: (8000-FFFF)
000E  32  STRING  Name of game or song 
002E  32  STRING  Name of artist or songwriter
004E  32  STRING  Name of the copywrite holder
006E  2   WORD    (lo/hi) This is the NTSC playback speed. 411A is usually just fine.
0070  8   BYTE    Bankswitching Init 8 bit value. Explained in better detail later.
0078  2   WORD    (lo/hi) This is the PAL playback speed.
007A  1   BYTE    PAL/NTSC The following bits are set for either a PAL or NTSC game.
                 bit 0: if clear, this is an NTSC tune
                 bit 0: if set, this is a PAL tune
                 bit 1: if set, this is a dual PAL/NTSC tune
                 bits 2-7: Not used and must be 0's
007B  1   BYTE   Special sound chip support
                 bit 0: 1 = Konami   VRC6
                 bit 1: 1 = Konami   VRC7
                 bit 2: 1 = Nintendo FDS
                 bit 3: 1 = Nintendo MMC5
                 bit 4: 1 = Namcot   106
                 bit 5: 1 = Sunsoft  FME7
                 bits 6-7:  Currently unused. For future expansion. More sound chips out there possibly.
007C    4   ----    4 extra bytes for expansion (must be 00h)
0080  nnn ----    The ripped data goes here.
-----------------------